#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "mainpage.h"
#include "camera_app.h"
#include "map_app.h"
#include "message_app.h"
#include "music_app.h"
#include "video_app.h"
#include "setting_app.h"
#include "photo_app.h"
#include "clock_app.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void onPageSwitch(AppType index);

    void on_backButton_clicked();

private:
    Ui::MainWindow *ui;
    QMap<AppType,QWidget*> appCache;
};
#endif // MAINWINDOW_H
